<?php
$arrOptions = array('0' => 'LABEL_STATUS_ANY') + Core_Model_DbTable_Entries::getArrOptionStatus();
foreach($arrOptions as $key => $value)
{
	$arrOptions[$key] = $this->translate($value);
}
?>
<form action="<?php echo $this->url(array('page'=> null))?>" id="form_seach" onsubmit="performSubmit.call(this);">
	<?php echo $this->formText(
			Core_Model_IEntry::PARAM_KEYWORD,
			!empty($_GET[Core_Model_IEntry::PARAM_KEYWORD])?$_GET[Core_Model_IEntry::PARAM_KEYWORD]:'',
			array()
		) 
	?>
	<?php echo $this->formSelect(
			Core_Model_IEntry::PARAM_KEYWORD_FILTER,
			!empty($_GET[Core_Model_IEntry::PARAM_KEYWORD_FILTER])?$_GET[Core_Model_IEntry::PARAM_KEYWORD_FILTER]:'',
			array(),
			array(
				Core_Model_IEntry::FILTER_BY_TITLE_DESC_VALUE	=> $this->translate('LABEL_TITLE_DESC'),
				Core_Model_IEntry::FILTER_BY_REGISTRANT_VALUE	=> $this->translate('LABEL_REGISTRANT'),
			)
		)
	?>
	<?php echo $this->formSelect(
			Core_Model_IEntry::PARAM_STATUS,
			!empty($_GET[Core_Model_IEntry::PARAM_STATUS])?$this->escape($_GET[Core_Model_IEntry::PARAM_STATUS]):'',
			array(),
			$arrOptions
		)
	?>
	<input class="greenbutton" type="submit" value="Search" />
</form>
<script>
function performSubmit()
{
	var url		= this.action;
	var expand	= $(this).serialize();
	location.href = this.action + '?' + expand;
	return false;
}
</script>